/**
 * @Date 2023-02-21 14:00:07
 * @Remark
 */

// lib
// import moment from "moment";
// config
// script & methods & public
// store
import { state } from "./state";
// service
// interface
// import {
//   ReqDeliveryRecordOrderTypeUpdate,
//   ReqDeliveryRecordPage,
//   ReqReissueGoods,
// } from "biz/DeliveryRecord/api";
// import {
//   // getDeliveryRecordDetailService,
//   getDeliveryRecordPageService,
//   getReissueGoodsPageService,
//   updateDeliveryRecordOrderTypeService,
// } from "biz/DeliveryRecord/service";
// import toast from "components/toast";

// // 配送记录-配送记录分页列表
// export async function getDeliveryRecordPage() {
//   const sp = state.getSearch();
//   const params: ReqDeliveryRecordPage = {
//     ...sp,
//     pageNum: state.page,
//     pageSize: state.size,
//   };
//   state.loading = true;
//   const result = await getDeliveryRecordPageService(params);
//   state.loading = false;
//   if (result.payload) {
//     state.total = result.payload.total;
//     state.list = result.payload.list;
//   }
// }

// // 配送记录-补发图书分页列表
// export async function getReissueGoodsPage(orderId: string) {
//   const params: ReqReissueGoods = {
//     orderId,
//     pageNum: state.reissueGoodsPage,
//     pageSize: state.reissueGoodsSize,
//   };
//   state.loading = true;
//   const result = await getReissueGoodsPageService(params);
//   state.loading = false;
//   if (result.payload) {
//     state.reissueGoodsTotal = result.payload.total;
//     state.reissueGoodsList = result.payload.list;
//   }
// }

// // 配送记录-修改订单状态
// export async function updateDeliveryRecordOrderType(form: any, id: string) {
//   const params: ReqDeliveryRecordOrderTypeUpdate = {
//     ...form,
//     id,
//   };
//   state.editModalLoading = true;
//   const result = await updateDeliveryRecordOrderTypeService(params);
//   state.editModalLoading = false;
//   if (result.payload) {
//     toast.success("编辑成功");
//     state.abnormalOrderEditModal = false;
//     getDeliveryRecordPage();
//   }
// }

// export async function didMount() {
//   getDeliveryRecordPage();
// }
